protected Vector2 Origin;
public bool Active;
public Rectangle Box;
- protected Vector4 BoxDimensions;
+ public Vector4 BoxDimensions;
protected Texture2D BoxTexture;
// Physical Properties
public float Angle;
// Constraints / Behavior
- protected float MaxVelocity;
+ public float MaxVelocity;
protected float AccelerationRate;
- protected int HP;
+ public int HP;
protected bool Immortal;
public bool Dying;
public int Value;
public Actor(SuperPolarity newGame)
{
game = newGame;
+ BoxDimensions.X = 20;
+ BoxDimensions.Y = 20;
+ BoxDimensions.W = 15;
+ BoxDimensions.Z = 15;
}
public virtual void Initialize(Texture2D texture, Vector2 position)
HP = 1;
Immortal = false;
- BoxDimensions.X = 20;
- BoxDimensions.Y = 20;
- BoxDimensions.W = 20;
- BoxDimensions.Z = 20;
Dying = false;
Value = 1;
protected void InitBox()
{
- Box = new Rectangle((int)(Position.X - BoxDimensions.X), (int)(Position.Y - BoxDimensions.X), (int)(BoxDimensions.X + BoxDimensions.W), (int)(BoxDimensions.Y + BoxDimensions.Z));
+ Box = new Rectangle((int)(Position.X - BoxDimensions.X), (int)(Position.Y - BoxDimensions.X), (int)(BoxDimensions.X + BoxDimensions.X + BoxDimensions.W), (int)(BoxDimensions.Y + BoxDimensions.Y + BoxDimensions.Z));
}
public void AutoDeccelerate(GameTime gameTime)
public void ChangeAngle()
{
+ if (Math.Abs(Velocity.Y) <= 0.1 && Math.Abs(Velocity.X) <= 0.1)
+ {
+ return;
+ }
Angle = (float)Math.Atan2(Velocity.Y, Velocity.X);
}